<template>
	<view class="choicBox">
		<image src="/static/pages/index/choicImg.png" class="choicImg" mode=""></image>
		<!-- 图标 -->
		<view class="choicBoxContent">
			<view class="choicBoxContentNav">
				<view class="navImg">
					<image src="/static/home/logo.png" mode="" style="border-radius: 20rpx;" ></image>
				</view>
			</view>
			<!-- 名字 -->
			<view class="navImgWord">
				一丰西南销售市场管理平台
			</view>
			<!-- 选择路径 -->
			<view class="choicRoute1" @click="choiceClick(2)">
				<image src="/static/pages/index/choicImg1.png" class="choicRoute1Img" mode=""></image>
				<view class="choicRoute1Word">
					DLR
				</view>
			</view>
			<view class="choicRoute2" @click="choiceClick(1)">
				<image src="/static/pages/index/choicImg1.png" class="choicRoute2Img" mode=""></image>
				<view class="choicRoute2Word">
					区域
				</view>
			</view>
			<view class="explain">
				DLR和区域在一个小程序内，只是登录后显示内容有差别
			</view>
		</view>
	</view>
</template>

<script>
	import {
		login
	} from "../../request/api.js"
	export default {
		data() {
			return {
				account:'',
				password:'',
				type:'',
			};
		},
		onLoad() {
			
		},
		methods:{
			choiceClick(type){
				// this.type = type
				// //type为0=>DLR type为1=>区域
				// login({
				// 	account:this.account,
				// 	password:this.password,
				// 	type:this.type,
				// }).then(res => {
				// 	console.log(res);
				// })
				// uni.switchTab({
				// 	url:"/pages/DLR/activity/activity"
				// })
				if(type==2){
					// login({
					// 	account:this.account,
					// 	password:this.password,
					// 	type:this.type,
					// }).then(res => {
					// 	console.log(res);
					// })
					uni.reLaunch({
						url:"/pages/index/index?type=" + type
						// url:"/pages/DLR/activity/activity"
					})
				}else if(type==1){
					uni.reLaunch({
						url:"/pages/index/index?type=" + type
						// url:'/pages/groundPole/distributor/distributor'
					})
				}
				
			}
		}
	}
</script>

<style lang="scss">
.choicBox{
	width: 100%;
	height: 100vh;
	box-sizing:border-box;
	position: relative;
	.choicImg{
		width: 100%;
		height: 100%;
	}
	.choicBoxContent{
		width: 100%;
		height: 100vh;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 99;
		box-sizing:border-box;
		.choicBoxContentNav{
			width: 100%;
			display: flex;
			margin-top: 161rpx;
			justify-content: space-around;
			.navImg{
				width: 100rpx;
				height: 100rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
		}
		.navImgWord{
			font-size: 36rpx;
			text-align: center;
			color: #FFFFFF;
		}
		.choicRoute1{
			width: 699rpx;
			height: 139rpx;
			margin: 122rpx auto 0;
			position: relative;
			.choicRoute1Img{
				width: 100%;
				height: 100%;
			}
			.choicRoute1Word{
				width: 100%;
				height: 100%;
				color: #FFFFFF;
				font-size: 42rpx;
				text-shadow: 4rpx 4rpx 6rpx rgba(240, 74, 23, 0.84);
				position: absolute;
				top: 0;
				left: 0;
				text-align: center;
				line-height: 139rpx;
			}
		}
		.choicRoute2{
			width: 699rpx;
			height: 139rpx;
			margin: 116rpx auto 0;
			position: relative;
			.choicRoute2Img{
				width: 100%;
				height: 100%;
			}
			.choicRoute2Word{
				width: 100%;
				height: 100%;
				color: #FFFFFF;
				font-size: 42rpx;
				text-shadow: 4rpx 4rpx 6rpx rgba(240, 74, 23, 0.84);
				position: absolute;
				top: 0;
				left: 0;
				text-align: center;
				line-height: 139rpx;
			}
		}
		.explain{
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			line-height: 40rpx;
			text-align: center;
			margin-top: 109rpx;
		}
	}
}
</style>
